﻿using System;
using System.Collections.Generic;
using BotonJXC.Entity;
using LogisticsModelDAO = BotonJXC.DAO.LogisticsModelDAO;
using BotonJXC.Util;
using NHibernate.Criterion;

namespace BotonJXC.BLL
{
    public class LogisticsModelBLL : BaseBLL<LogisticsModelDAO, LogisticsModel, int>
    {
        public LogisticsModelBLL()
        {
        }

        public PageModel<LogisticsModel> Find(string logisticsModelName, int start, int count)
        {
            List<ICriterion> criterions = new List<ICriterion>();
            if (!string.IsNullOrEmpty(logisticsModelName))
            {
                criterions.Add(Restrictions.Like("LogisticsModelName", logisticsModelName, MatchMode.Anywhere));
            }
            return Dao.FindByPage(criterions.ToArray(), null, start, count);
        }
    }
}